export function msToTime(duration) {
    let seconds = Math.floor((duration / 1000) % 60),
        minutes = Math.floor((duration / (1000 * 60)) % 60),
        hours = Math.floor((duration / (1000 * 60 * 60)) % 24);

    hours = hours > 0 ? (hours < 10 ? `0${hours}:` : `${hours}`) : ''
    minutes = minutes > 0 ? (minutes < 10 ? `0${minutes}:` : `${minutes}`) : ''
    seconds = seconds > 0 ? (seconds < 10 ? `0${seconds}` : `${seconds}`) : ''
    return `${hours}${minutes}${seconds}`
}